package day03;

public class OperDemo1 {
    public static void main(String[]args){
        int a = 6;
        int b = 7;
        a++;
        ++b;
        System.out.println(a);
        System.out.println(b);

        System.out.println("----------------------------");

        int c = 10;
        int d = 10;
        int e = c++;
        int f = ++d;
        System.out.println(c);//11
        System.out.println(d);//11
        System.out.println(e);//10
        System.out.println(f);//11

        System.out.println("--------------------------------------");
        int o = 5;
        int p = 5;
        o--;
        --p;
        System.out.println(o);//4
        System.out.println(p);//4
        System.out.println("------------------------------------");

        int q = 8;
        int w = 8;
        int t =q--;
        int r =--w;
        System.out.println(q);//7
        System.out.println(w);//7
        System.out.println(t);//8将q--的值赋给t，同时q自减1为7
        System.out.println(r);//7将--w的值赋给r，同时w自减1为7
    }
}
